<template>
  <div>
    <div class="text-item" v-for="(item, index) in articleList" :key="index">
      <div class="flex">
        <p @click="childMethod(item.id)">
        {{ item.title }}
      </p>
      <p>阅读：{{ item.read }}</p>
      </div>
       
    </div>
  </div>
</template>
<script>
export default {
  props: {
    articleList: {
      type: Array,
      required: true,
    },
  },

  data() {
    return {};
  },
 
  methods:{
    childMethod(id){
       this.$emit('goTextInfo',id);
    }
  }
};
</script>

<style lang="less" scoped>
.text-item {
  font-family: cursive;
  padding-bottom: 4px;
  .flex{
    display: flex;
    flex-direction: column;
    
  p {
    font-size: 15px;
    margin: 5px 0;
  }
  p:last-child {
    font-size: 12px;
    color: rgb(139, 137, 137);
  }
   p:first-child:hover{
       text-decoration: underline rgb(177, 175, 175);
       cursor: pointer;
   }
  }
}
</style>